'use strict';

const Service = require('egg').Service;
const {ObjectId} = require("mongodb")
class FoodService extends Service {
  async find(id=null) {
    var db = this.app.mongodb;
    var res = await db.collection("dish").find({_id:ObjectId(id)}).toArray();
    return res
  }
}

module.exports = FoodService;
